package com.fengmi.goods.controller;


import com.fengmi.goods.entity.MallGoods;
import com.fengmi.goods.service.IMallGoodsService;
import com.fengmi.goods.vo.HotGoodsVo;
import com.fengmi.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhuxm
 * @since 2022-03-02
 */
@RestController
@RequestMapping("/goods/")
public class MallGoodsController {


    @Autowired
    private IMallGoodsService goodsService;

    @RequestMapping("findHotGoods")
    public List<HotGoodsVo> findHotGoods(){

        return goodsService.findHotGoods();
    }


    @RequestMapping("findGoodsHasAuditedForEs")
    public List<MallGoods> findGoodsHasAuditedForEs(){
        return  goodsService.findGoodsHasAuditedForEs();
    }


    @RequestMapping("audit")
    public ResultVO audit(String spuId){
        return goodsService.auditGoods(spuId);
    }


    @RequestMapping("findGoodsForHTML")
    public MallGoods findGoodsForHTML(String spuId){

        return goodsService.findGoodsForHTML(spuId);
    }




}
